package com.smartrodin.springbootrabbitmq.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Author: wanger
 * @Date: Created in 2019/8/3 22:32
 * @description: 自定义缓存
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RedisCache {

    /**
     * Redis key
     *
     * @return
     */
    String key() default "";

    /**
     * 失效时间,单位:秒
     *
     * @return
     */
    int expire() default 60;
}
